//
//  CurrirculumRequest.swift
//  DianShangWen
//
//  Created by 周文轩 on 15/4/14.
//  Copyright (c) 2015年 &#21608;&#25991;&#36713;. All rights reserved.
//

import Foundation
import Argo

class CurrirculumListRequest {
    class func currirculumList(curriculums: (JSONVaules: NSDictionary) -> Void) {
        let curriculum: () = ServerRequest.ServerRequest("course.wall.list", requestStayle: ".get", params: ["ordertype":0, "imgwidth":50, "imgheight":40, "pagenum":0, "pagesize":0], tag: 12) { (dataDictionary) -> Void in
            curriculums(JSONVaules: dataDictionary)
        }
    }
    
    class func currirculumListID(currirculum: (ID: [Currirculums]) -> Void) {
        CurrirculumListRequest.currirculumList({ (JSONVaules) -> Void in
            let value = JSONValue.parse(JSONVaules)
            let curriculum = Currirculum.decode(value)
            currirculum(ID: curriculum!.courses)
        })
    }
}